public class Test {
    public static void main(String[] args) {
        WashMachine washMachine = new WashMachine();
    }
}

class WashMachine {
    public String brand = "美的";//就地初始化
    public int size;//  默认初始化
    public String color;// 默认初始化
//
//    public WashMachine(String brand, int size, String color) {
//        brand = brand;
//        size = size;
//        color = color;
//    }



    public WashMachine() {
        System.out.println("没有参数的构造方法");
    }
//    public WashMachine(String brand, int size, String color) {
//        this.brand = brand;
//        this.size = size;
//        this.color = color;
//        System.out.println("三个参数的构造方法");
//    }

    //洗衣服功能
    public void washing() {
        System.out.println("洗衣服");
    }
//    public void washing(WashMachine this) {
//        System.out.println("洗衣服");
//    }




    public WashMachine(String brand, int size, String color) {
//        this(brand,size);
        this.WashMachine(brand,size);
        this.color = color;
    }

    public WashMachine(String brand, int size) {
        this.brand = brand;
        this.size = size;
        System.out.println("两个参数的构造方法");
    }

    public WashMachine(String brand) {
        this.brand = brand;
        System.out.println("一个参数的构造方法");
    }
}
